﻿using System.Text;

namespace MyFinanceManager.Objects
{
    public class FuelRecord : Record
    {
        public double Gasprice { get; set; }
        public string Fuelstation { get; set; }
        public int Mileage { get; set; }
        public double AmountOfGas { get; set; }

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder(base.ToString());
            sb.Append("Gasprice: ");
            sb.AppendFormat("{0:N3} EUR/l", this.Gasprice);
            sb.AppendLine();
            sb.Append("Amount of Gas: ");
            sb.AppendLine(this.AmountOfGas.ToString("N2"));
            sb.Append("Fuelstation: ");
            sb.AppendLine(this.Fuelstation);
            sb.Append("Current Mileage: ");
            sb.AppendFormat("{0:000000}", this.Mileage);
            sb.AppendLine();
            return sb.ToString();
        }
    }
}
